package cn.tedu.myweb.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("friend")
public class Friends implements Serializable {
    private static final long serialVersionUID = 1L;
    @TableId(value = "id" , type = IdType.AUTO)
    private Integer id;
    @TableField(value = "user_id")
    private Integer userId;
    @TableField(value = "friend_name")
    private String friendName;
    @TableField(value = "friend_id")
    private Integer friendId;
    @TableField(value = "master_id")
    private Integer masterId;
    @TableField(value = "room_id")
    private Integer roomId;

    @TableField(exist = false)
    //当前好友的聊天记录
    private List<Chats> chats;

    @TableField(exist = false)
    private String userName;

}
